using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using GaiNo.WS.Core.Models;
namespace GaiNo.WS.Core.Services
{
    internal class SiteEntityBind
    {
        public static SiteEntity ReaderBind(IDataReader dataReader)
        {
            SiteEntity entity = new SiteEntity();
            object ojb;
            ojb = dataReader["UId"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.UId =Convert.ToInt32(ojb);
            }
			ojb = dataReader["BannerUrl"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.BannerUrl = Convert.ToString(dataReader["BannerUrl"]);
            }
            
			ojb = dataReader["Created"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.Created = Convert.ToDateTime(dataReader["Created"]);
            }
            
			ojb = dataReader["Currency"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.Currency = Convert.ToInt32(dataReader["Currency"]);
            }
            
			ojb = dataReader["LogoUrl"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.LogoUrl = Convert.ToString(dataReader["LogoUrl"]);
            }
            
			ojb = dataReader["Name"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.Name = Convert.ToString(dataReader["Name"]);
            }
            
			ojb = dataReader["Status"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.Status = Convert.ToInt32(dataReader["Status"]);
            }
            
			ojb = dataReader["Title"];
            if (ojb != null && ojb != DBNull.Value)
            {
                entity.Title = Convert.ToString(dataReader["Title"]);
            }
            
            return entity;
        }
    }
}

